Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@xster
Copy link
Member

@xster xster commented Mar 30, 2021

Help make bugs like flutter/flutter#78625 a bit more obvious

Fixes flutter/flutter#74646

@xster xster changed the title Deduplicate plugin registration logic Deduplicate plugin registration logic and make errors visible Mar 30, 2021
@xster xster changed the title Deduplicate plugin registration logic and make errors visible Deduplicate plugin registration logic and make error logs visible Mar 30, 2021
Log.e(
TAG,
// getCause here because the first layer of the exception would be from reflect.
"Received exception while registering: " + e.getCause());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we could print out the name of the plugin that created the problem too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, I'd like to buff up the actual content of the method being called by reflection too. Though that's in the flutter/flutter repo (that Java file is made by flutter_tools). Right now, I think it does state which plugin caused the problem (in the exception call stack which has the plugin's package name in it).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deduplicate FlutterEngine.registerPlugins and GeneratedPluginRegister

4 participants